package top.dreamix.njitkit.ui

import androidx.compose.runtime.Composable
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import top.dreamix.njitkit.ui.component.LoadingDialog
import top.dreamix.njitkit.ui.route.AppRouter
import top.dreamix.njitkit.ui.screen.MainScreen
import top.dreamix.njitkit.ui.screen.NetworkConfigScreen
import top.dreamix.njitkit.ui.screen.yiban.YibanMainScreen
import top.dreamix.njitkit.ui.screen.yiban.YibanUserAddDialog

@Composable
fun AppNavigation() {
    val navController = rememberNavController()
    NavHost(navController = navController, startDestination = AppRouter.Main.route) {
        composable(AppRouter.Main.route) {
            MainScreen(navController = navController)
        }
        composable(AppRouter.NetworkConfig.route) {
            NetworkConfigScreen(navController = navController)
        }
        composable(AppRouter.Yiban.route) {
            YibanMainScreen(navController = navController)
        }
        composable(AppRouter.Dialog.Loading.route) {
            LoadingDialog(navController = navController)
        }
    }
}
